<?php
$id = isset($_GET['id'])?(int)$_GET['id']:0;
$lanmu = isset($_GET['lanmu'])?(int)$_GET['lanmu']:0;

$where_sql=" where lc_del=0 and lc_zt=1 ";
if($lanmu){
	$where_sql.=" and lanmu='{$lanmu}'";
}
if(!$id){
	$where_sql.=" order by lc_sort_id  LIMIT 1";
}else{
	$where_sql.=" and lc_id='{$id}'";
}
$sql = "select * from ".lc()."_danye ".$where_sql;
$rs = mysql_query($sql);
if($rs && mysql_num_rows($rs)>0){
	$rows = mysql_fetch_assoc($rs);
	$lanmu=$rows['lanmu'];
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title><?php echo $rows['lc_title']?> - <?php echo top_keys(7)?></title>
<meta name="description" content="<?php echo top_keys(9)?>">
<meta name="keywords" content="<?php echo top_keys(8)?>">
<link href="<?php echo TPL_URL?>style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="body"><?php require('head.php')?>
<div id="middle">
<div id="left">
<div id="type">
<div class="title">
<h1>栏目分类</h1>
</div>
<ul>
<?php echo get_danye_type_qiantai_ul($lanmu)?>
</ul>
</div>
<!-- type --></div>
<!-- left -->
<div id="right">
<div class="title">
<h1><?php echo get_lanmu_name($lanmu)?></h1>
<h3><a href="index.php">首页</a> > <?php echo $rows['lc_title']?></h3>
</div>
<div id="con"><?php echo $rows['lc_content']?></div>
</div>
<!-- right -->
<div class="clear"></div>
</div>
<?php require('bot.php')?></div>
<!-- body -->
<br>
<br>
</body>
</html>
